<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>Title</title>
    <!-- JS -->
    <script type="text/javascript" th:src="@{/myconfig/bootstrap/js/jquery.js} " src="myconfig/bootstrap/js/jquery.js"></script>
    <script type="text/javascript" th:src="@{/myconfig/layui/layui.js}" src="myconfig/layui/layui.js"></script>
    <script type="text/javascript" th:src="@{/itemAndTask/js/jquery.params.js}" src="itemAndTask/js/jquery.params.js"></script>



    <!-- CSS -->
    <link th:href="@{/myconfig/layui/css/layui.css}" href="myconfig/layui/css/layui.css"type="text/css" rel="stylesheet" media="all">
    <style>
        body{margin: 20px 20px 20px 0;}
        .demo-carousel{height: 200px; line-height: 200px; text-align: center;}
    </style>
</head>
<body>

<div class="demoTable layui-row"   >
    <div class="layui-inline layui-col-xs8" style="margin-left: 15%">
        所属事项:
        <div class="layui-form">
            <input lay-verify="" id="itemName" disabled size="38">
        </div>
        任务状态:
        <div class="layui-form">
            <input lay-verify="" id="itemTaskState" disabled size="38">
        </div>
        发布时间:
        <div class="layui-form">
            <input lay-verify="" id="itemTaskTime" disabled size="38">
        </div>
        子任务内容:
        <div class="layui-form">

            <textarea lay-verify="" id="taskInfo" rows="5" cols="40" placeholder="请输入任务内容"disabled></textarea>
        </div>
        执行人:
        <div class="layui-form">
            <input lay-verify="" id="itemTaskWorker" disabled size="38">
        </div>
        <br>


    </div>
</div>



<script>
    var itemTaskId=$.query.get("itemTaskId");
    var urengcyId=$.query.get("urengcyId");
    var itemId=$.query.get("itemId");

    itemTaskId=JSON.stringify(itemTaskId);
    itemTaskId=Number(itemTaskId);
    urengcyId=Number(urengcyId);
    //查询task详情
    function findTask(itemTaskId) {
        $.ajax({
            url:'itemTask/detile'
            ,data:{
                itemTaskId:itemTaskId
            }
            ,success: function (data) {
                var task =data;
                $("#taskInfo").html(task.itemTaskContent);

                $("#itemTaskWorker").val(task.itemTaskWorker.userName);
                $("#itemName").val(task.item.itemName);
                $("#itemTaskState").val(task.itemTaskStatus.statusName);
                $("#itemTaskTime").val(task.itemTaskTime);
                //alert(task.itemTaskWorker.userName)

            }

        })
    }


</script>
<script>
    var $;
    var element;
    var form;
    layui.use(['layer','element','jquery','laydate','form'],function () {
        form =layui.form;
        layer = layui.layer;
        $ = layui.jquery;
        element = layui.element;
        laydate = layui.laydate;
        //findWorker();
        findTask(itemTaskId);

    })


</script>

</body>
</html>